package bpm.dao.impl.foreignactive;

import java.util.List;

import javax.annotation.Resource;


import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import bpm.dao.foreignactive.ForeignActiveAttachDao;
import bpm.domain.foreignactive.ForeignActiveAttach;


@Repository("foreignActiveAttachDao")
public class ForeignActiveAttachDaoImpl implements ForeignActiveAttachDao{
	
	@Resource
	private JdbcTemplate jdbcTemplate;
	
	public void saveForeignActiveAttach(String sql,Object...obj) {
		this.jdbcTemplate.update(sql,obj);
		
	}
	
	public void deleteAllForeignActiveAttach(String sql) {
		this.jdbcTemplate.update(sql);
		
	}

	public void deleteForeignActiveAttach(String sql) {
		this.jdbcTemplate.update(sql);
		
	}

	@SuppressWarnings("unchecked")
	public List<ForeignActiveAttach> findForeignActiveAttachList(String sql) {
		
		return this.jdbcTemplate.query(sql, new ForeignActiveAttachRowMapper());
	}

	@SuppressWarnings("unchecked")
	public List<String> findAttahResId(String sql) {
		List<String> list = this.jdbcTemplate.queryForList(sql);
		return list;
	}

	

}
